NevronOpenVision
Nevron.Nov.Dom Namespace / NDocumentFormatRegistry<TDocumentFormat> Class / GetFromFileWithScoreAsync Method
The file to analyze.
Specifies whether the file is going to be used for reading or for writing.
GetFromFileWithScoreAsync Method
Gets the document format from the specified file name.
Syntax
public NPromise<NDocumentFormatWithScore> GetFromFileWithScoreAsync( 
   NFile file,
   System.bool forReading
)

Parameters

file
The file to analyze.
forReading
Specifies whether the file is going to be used for reading or for writing.

Return Value

A promise that returns a document format with score. The match score of the returned document format. Can be:

2 - the returned document format matches both the given file extension and header

1 - the returned document format matches either the given file extension or header

0 - the returned document format is the default document format, because no format in this registry matches the given file extension or header

Requirements

Target Platforms: Windows 11, Windows 10, Windows 7, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later)

See Also